<template>
	<view  class="container">
		<web-view :src="url"></web-view>
	</view>
</template>

<script setup>
	 import {
	 	onLoad
	 } from "@dcloudio/uni-app"
	 import {
	 	ref
	 } from 'vue'
	 import {
	 	CONFIG
	 } from "../../utils/config"
	 
	 import {userStore} from "../../store/userStore.js"	
	 const store=userStore()
	 
	 // URL: //m.amap.com/navi/?start=116.403124,39.940693&dest=116.481488,39.990464&
	 // destName=一条驾车路线&key=（您的Key）&jscode=（您的安全密钥）
	 const url=ref("")
	 onLoad((data)=>{
		 url.value=`${CONFIG.gaode_line_url}?start=${data.slon},${data.slat}&dest=${data.elon},${data.elat}&destName=${data.name}&key=${CONFIG.gaode_key}&jscode=${CONFIG.gaode_skey}`
		 console.log(url.value)
	 })
	 
</script>

<style >

</style>
